<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles"
	prefix="tiles"%>

<rich:panel header="Inventory">
	<h:panelGrid>
		<h:outputText value="#{errorBean.errorMessage}" styleClass="error"></h:outputText>
	</h:panelGrid>
 

	<t:panelGrid columns="2" columnClasses="standardTable_ColumnLeft_20,standardTable_ColumnLeft_80" width="100%">

		 
		<h:panelGroup> 
			<h:outputLabel   value="Product Name" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
			<h:outputLabel   value="#{partnerInventoryBean.partnerProduct.name}" styleClass="standardText_Label" />
	 	</h:panelGroup>
		 
		<h:panelGroup> 
			<h:outputLabel value="Description" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
			<h:outputLabel value="#{partnerInventoryBean.partnerProduct.desc}" styleClass="standardText_Label" />
	 	</h:panelGroup>
		<h:outputText></h:outputText>
		<t:message for="fromDate" styleClass="error"></t:message>
		<h:panelGroup>
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="fromDate" value="From Date" styleClass="standardText_Label" />
		</h:panelGroup>
			<t:inputCalendar
		    	id="fromDate"
					monthYearRowClass="yearMonthHeader" weekRowClass="weekHeader" 
					currentDayCellClass="currentDayCell" value="#{partnerInventoryBean.fromDate}"
					renderAsPopup="true" popupTodayString="#{messages['popup.today']}"
					popupWeekString="#{messages['popup.week']}" popupDateFormat="dd/MM/yyyy"
					renderPopupButtonAsImage="true"
					styleClass="standardText" required="true"
		    	>
		    	</t:inputCalendar>
		    		<h:outputText></h:outputText>
		<t:message for="toDate" styleClass="error"></t:message>
		<h:panelGroup>
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="toDate" value="To Date" styleClass="standardText_Label" />
		</h:panelGroup>
			<t:inputCalendar
		    	id="toDate"
					monthYearRowClass="yearMonthHeader" weekRowClass="weekHeader" 
					currentDayCellClass="currentDayCell" value="#{partnerInventoryBean.toDate}"
					renderAsPopup="true" popupTodayString="#{messages['popup.today']}"
					popupWeekString="#{messages['popup.week']}" popupDateFormat="dd/MM/yyyy"
					renderPopupButtonAsImage="true"
					styleClass="standardText" required="true"
		    	>
		    	</t:inputCalendar>		    	
	
		<h:outputText></h:outputText>
		<t:message for="noRoom" styleClass="error"></t:message>
		<h:panelGroup>
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="noRoom" value="No. Of Room" styleClass="standardText_Label" />
		</h:panelGroup>
		<t:inputText id="noRoom" required="true" size="3" maxlength="3" styleClass="standardText" value="#{partnerInventoryBean.noRoom}"></t:inputText>
			</t:panelGrid>
	<rich:spacer height="30"></rich:spacer>
	
	<t:panelGrid columns="2" columnClasses="standardTable_ColumnLeft_20,standardTable_ColumnLeft_80" width="100%">
		<t:outputText></t:outputText>
		<t:panelGroup>
		
   			<h:commandButton value="Inc" styleClass="button" action="#{partnerInventoryBean.incAction}"></h:commandButton>
   			<f:verbatim>&nbsp;</f:verbatim>
		 	<h:commandButton value="Dec" styleClass="button" action="#{partnerInventoryBean.decAction}" ></h:commandButton>
   		</t:panelGroup>
	</t:panelGrid>
	
</rich:panel>
